package com.kugou.miniapp.controller;

import com.kugou.miniapp.domain.LikeAndUserList;
import com.kugou.miniapp.domain.Music;
import com.kugou.miniapp.domain.Users;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@RestController
@RequestMapping("/other")
public class OtherController {
    @Autowired
    RestTemplate restTemplate;

    @GetMapping("/his")
    public String getHisToday(){
        System.out.println("his his his");
        ResponseEntity<String> entity = restTemplate.getForEntity("https://www.ipip5.com/today/api.php?type=json", String.class);
        return entity.getBody();
    }

}
